(globalThis.webpackChunkCE2=globalThis.webpackChunkCE2||[]).push([[806,60],{5096:(t,e,r)=>{"use strict";r.r(e),r.d(e,{AssetTracker:()=>lr,EventHandlers:()=>hr,compress:()=>Bt,fp:()=>ur,timing:()=>W});const i="[\\s\\u00a0\\u2028\\u2029]+";let s;if("undefined"!=typeof Intl&&Intl.Segmenter)try{s=new Intl.Segmenter}catch(t){}const n={whitespace:new RegExp(i,"g"),strip:new RegExp(`^${i}|${i}$`,"g"),href:/\bhref="(.*?)"/i,ipHost:/^([\d\.]+|\[[a-f\d:]+\])$/i,allChars:/\p{RI}\p{RI}|\p{Emoji}(\p{EMod}|\u{FE0F}\u{20E3}?|[\u{E0020}-\u{E007E}]+\u{E007F})?(\u{200D}\p{Emoji}(\p{EMod}|\u{FE0F}\u{20E3}?|[\u{E0020}-\u{E007E}]+\u{E007F})?)*|./gsu};function o(t,e){const r=t.replace(n.strip,"");return e?r.replace(n.whitespace," "):r}const a=2048,c=65535-a;const l=`cesrk${Math.random().toString().replace(/\D/g,"")}`;function h(t){let e;const r=(t=t||window).document;return t[`${l}_path`]!==t.location.pathname&&(t[l]=function(t){const e=t.defaultView,r=t.documentElement;if(r.scrollHeight>e.innerHeight)return t.scrollingElement?t.scrollingElement:"BackCompat"===t.compatMode?t.body:r;if(!t.querySelectorAll||"number"!=typeof t.body.scrollHeight)return;const{body:i}=t,s=Array.from(t.querySelectorAll("html, body, body *")).filter((t=>!t.ownerSVGElement)),n=i.getElementsByTagName("*").length;let o,a,c,l;for(o=0,a=Math.min(7e3,s.length);o=c.scrollHeight)&&(c.offsetWidth||c.offsetHeight||c.getClientRects().length)&&!(c.getElementsByTagName("*").length/n<.5||c.clientHeight>window.innerHeight||(l=c.getBoundingClientRect(),Math.floor(l.width||l.right-l.left)<.75*e.innerWidth||Math.floor(l.height||l.bottom-l.top)<.75*e.innerHeight)))return c}(r),t[`${l}_path`]=t.location.pathname),e=t[l],e=e||("BackCompat"===r.compatMode?r.body:r.documentElement),{left:e.scrollLeft,top:e.scrollTop,width:t.innerWidth,height:t.innerHeight}}const u={};u.opera=u.ie=u.chrome=u.safari=u.firefox=!1,u.browser="unknown";const d="undefined"!=typeof window?window:{},p="undefined"!=typeof navigator?navigator:{},f=p.userAgent;function m(t,e){const r=Math.min(e.width,e.height),i=o(t.coords,!0).split(/[^\d\.%]+/).map((t=>function(t,e){let r=parseInt(t,10);return-1!=t.indexOf("%")&&(r*=.01*e),isNaN(r)?null:r}(t,r)));let s,n,a;if(!/circle/i.test(t.shape)){s=[],n=[];for(let t=0,e=i.length;t=3)return[s,n,a]=i,{left:s-a,top:n-a,width:2*a,height:2*a}}function g(t){const e=function(t){const e=new RegExp(`(^|#)${t.parentNode.name}`,"i"),r=t.ownerDocument.getElementsByTagName("IMG");let i,s;for(i=0;s=r[i++];)if(e.test(s.useMap))return s}(t);if(!e)return;const r=E(e),i=m(t,r);return i?{left:r.left+i.left,top:r.top+i.top,width:i.width,height:i.height}:void 0}function E(t,e,r,{usePseudo:i=!1}={}){let s;if(e=e||{},"AREA"==t.nodeName)s=g(t),s&&(e.left=s.left,e.top=s.top,e.width=s.width,e.height=s.height);else if(t.getBoundingClientRect){s=t.getBoundingClientRect();const r=h();if(e.left=Math.floor(s.left+r.left),e.top=Math.floor(s.top+r.top),u.webkit&&u.webkitVersion<533&&"relative"==t.style.position&&(e.left+=parseInt(t.style.left,10),e.top+=parseInt(t.style.top,10)),e.width=Math.floor(s.width||s.right-s.left),e.height=Math.floor(s.height||s.bottom-s.top),i&&(0===e.width||0===e.height)){const r=function(t){let e,r;for(let i=0,s=["::before","::after"];it.nodeType===Node.TEXT_NODE))))}d.opera&&"function"==typeof d.opera.version?(u.browser="opera",u.opera=!0,u.operaVersion=parseInt(d.opera.version(),10)):/\bMSIE\b/.test(f)?(u.browser="ie",u.ie=!0,u.ieVersion=parseInt(/MSIE (\d+)\.\d+/.exec(p.userAgent)[1],10),u.ieQuirksMode="BackCompat"==document.compatMode):/\b(iPhone|iP[ao]d)\b/.test(f)?(u.browser="iphone",u.iphone=!0,u.webkit=!0):/\bChrome\b/.test(f)?(u.browser="chrome",u.chrome=!0,u.webkit=!0):/AppleWebKit/.test(p.appVersion)?(u.browser="safari",u.safari=!0,u.webkit=!0):/Mozilla/i.test(f)&&!/compatible|webkit/i.test(f)&&(u.browser="firefox",u.firefox=!0),u.webkit&&(u.webkitVersion=parseInt(/AppleWebKit\/(\d+)/.exec(f)[1],10));const v=function(t){if(this.src=t,this.protocol=this.host=this.port=this.path=this.qs=this.hash=this.query=null,t){const e=typeof t;"string"==e?this.initWithString(t):"object"==e&&this.initWithURI(t)}};function y(t){try{return decodeURIComponent(t)}catch(e){return window.unescape(t)}}v.pattern=/^\s*([\S]+?:\/\/)?([^\s\/]+?@)?([^:\/\?\#]+)?(\:\d+)?(\/?[^#\?\s]*)?([\?][^#\s]*)?([#]\S+)?/i,v.prototype={initWithString(t){const e=v.pattern.exec(t),[r,i,s,n,o,a,c,l]=e;i||"/"==t.charAt(0)?(i&&(this.protocol=i.substr(0,i.indexOf(":"))),this.host=n||null,o&&(this.port=Number(o.substr(1))),a?this.path=y(a):this.host&&(this.path="/")):this.path=y((n||"")+(a||"")),c&&(this.qs=function(t,e){if(null==t||/^\s*$/.test(t))return null;const r={};let i=null;const s=t.replace(/\+/g," ").split(e||"&");let n,o;for(n=0,o=s.length;nt.segment)):[...i.matchAll(n.allChars)].map((t=>t[0])),o.slice(0,e).join("")}(o(function(t){const e=void 0===t.textContent?"innerText":"textContent";let r=t[e].substr(0,16384);function i(t,r){let i,s;for(i=0;s=r[i++];)t=t.replace(s[e],"");return t}return r=i(r,t.getElementsByTagName("SCRIPT")),r=i(r,t.getElementsByTagName("NOSCRIPT")),r}(t),!0),e)}function _(t){if(!u.ie)return t.getAttribute("href");{const e=t.outerHTML.match(n.href);if(e)return o(e[1])}}function I(t){return/^\s*data:/.test(t)?o(t).substr(0,100):new v(t).simplify()}function O(t){const e=function(t){let e=t.className;if(e&&"string"==typeof e)return e=o(e.replace(/(\s|^)-ce-capture\b/g,"")).split(/\s+/),e.sort(),e.join(" ")}(t);if(!e||k<=6)return e;const r=[];for(let t=0,i=e.split(/\s+/);t=16?x:t>=13?P:12===t?M:null}function U(t){return"string"==typeof t?`[${R(function(t){const e=2147483648+function(t){let e=0;if(0==t.length)return e;for(let r=0;r=13?b:w}(e)[r]||0;return 0===i&&e>=13?r:i}function H(t){const e=[];let r,i,s="";for(let i=0,s=t.length;i2)s+=`${U(r.type)}x${R(r.count)}`;else for(let t=0;t=13,n=(s&&t.shadowRoot||t).querySelectorAll("*");for(let t=0;t=13&&o.ownerSVGElement||(i&&o.nodeName in i||C(o)||(r.push({type:$(o,e)}),s&&o.shadowRoot&&r.push(...V(o.shadowRoot,{formatVersion:e,descendants:r}))))}return r}const q=function(t,{formatVersion:e,ignore:r}={}){"number"!=typeof e&&(e=r?12:11);const i=function(t){return C(t)?1===t.children.length&&"FONT"===t.firstElementChild?t.parentElement:t.parentElement.parentElement:t}(t);this.type=$(i,e),this.elders=H(function(t,{formatVersion:e=11}={}){let r,i=t;const s=[],n=B(e),o=e>=13;for(;;){if(i.previousElementSibling)r=1,i=i.previousElementSibling;else if(i.parentNode&&i.parentNode!==document.body&&i.parentNode!==document.documentElement)r=2,i=i.parentNode;else{if(!o||i.nodeName!==D||!i.host)break;r=2,i=i.host}if(!(n&&i.nodeName in n||o&&i.nodeName===D||C(i)||(s.push({type:$(i,e),relation:r}),!(s.length>=32))))break}return s}(i,{formatVersion:e})),this.youngerSiblings=H(function(t,{formatVersion:e=11}={}){const r=[],i=B(e);for(let s=t.nextElementSibling;r.length<32&&s;s=s.nextElementSibling)i&&s.nodeName in i||C(s)||r.push({type:$(s,e)});return r}(i,{formatVersion:e})),this.descendants=H(V(i,{formatVersion:e})),E(i,this,null,{usePseudo:e>=16}),this.name=N(i),e>=16&&(this.visible=L(i))};q.fromObject=function(t){if(t instanceof q)return t;const e=Object.create(q.prototype);for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},q.prototype.toString=function(){return`${q.hex(this.type)};${this.elders};${this.youngerSiblings};${this.descendants}`};var F=r(1509),G=r(3380),j=r(7866);const K=function(){this.metrics={}};K.prototype={start(t){this.metrics[t]=+new Date},stop(t){const e=this.metrics[t];if(!e)return void(0,G.Yz)(`[TimingMetric] No starting point for "${t}", ignoring.`);const r=+new Date-e;this.cancel(t),this.send(t,r)},cancel(t){delete this.metrics[t]},send(t,e){if(t.length>100)throw new Error("Key is too long (max 100)");if((e=Number(e,10))&&Number.isNaN(Number(e)))throw new Error("Value is NaN");if(!CE2.site)return void(0,G.Yz)(`[TimingMetric] No site, skipping metric ${t}`);const r=[[(0,j.M4)(0,1),CE2.tracker?.visitorID,25,CE2.VERSION,+new Date,CE2.tabId],[CE2.tracker?.visitID,t,e||"",CE2.visitorTracker?.getIdentification()]];(0,F.sendEvents)({context:"TimingMetric",userId:CE2.data.uid,siteId:CE2.site.id,snapshotIds:CE2.tracker?.snapshotIds,sessionId:CE2.tracker?.sessionId,pageFingerprintMd5:CE2.tracker?.pageFingerprintMd5},[r]),(0,G.Yz)(`[TimingMetric] Sent key=${t} value=${e}`)},getTrackerValue(t){if(CE2.tracker)return CE2.tracker[t]}};const W=new K;var Y=Uint8Array,z=Uint16Array,X=Int32Array,Q=new Y([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),J=new Y([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Z=new Y([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),tt=function(t,e){for(var r=new z(31),i=0;i<31;++i)r[i]=e+=1<>1|(21845&at)<<1;ct=(61680&(ct=(52428&ct)>>2|(13107&ct)<<2))>>4|(3855&ct)<<4,ot[at]=((65280&ct)>>8|(255&ct)<<8)>>1}var lt=function(t,e,r){for(var i=t.length,s=0,n=new z(e);s>c]=l}else for(o=new z(i),s=0;s>15-t[s]);return o},ht=new Y(288);for(at=0;at<144;++at)ht[at]=8;for(at=144;at<256;++at)ht[at]=9;for(at=256;at<280;++at)ht[at]=7;for(at=280;at<288;++at)ht[at]=8;var ut=new Y(32);for(at=0;at<32;++at)ut[at]=5;var dt=lt(ht,9,0),pt=lt(ut,5,0),ft=function(t){return(t+7)/8|0},mt=function(t,e,r){return(null==e||e<0)&&(e=0),(null==r||r>t.length)&&(r=t.length),new Y(t.subarray(e,r))},gt=function(t,e,r){r<<=7&e;var i=e/8|0;t[i]|=r,t[i+1]|=r>>8},Et=function(t,e,r){r<<=7&e;var i=e/8|0;t[i]|=r,t[i+1]|=r>>8,t[i+2]|=r>>16},Ct=function(t,e){for(var r=[],i=0;id&&(d=n[i].s);var p=new z(d+1),f=vt(r[h-1],p,0);if(f>e){i=0;var m=0,g=f-e,E=1<e))break;m+=E-(1<>=g;m>0;){var v=n[i].s;p[v]=0&&m;--i){var y=n[i].s;p[y]==e&&(--p[y],++m)}f=e}return{t:new Y(p),l:f}},vt=function(t,e,r){return-1==t.s?Math.max(vt(t.l,e,r+1),vt(t.r,e,r+1)):e[t.s]=r},yt=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new z(++e),i=0,s=t[0],n=1,o=function(t){r[i++]=t},a=1;a<=e;++a)if(t[a]==s&&a!=e)++n;else{if(!s&&n>2){for(;n>138;n-=138)o(32754);n>2&&(o(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(o(s),--n;n>6;n-=6)o(8304);n>2&&(o(n-3<<5|8208),n=0)}for(;n--;)o(s);n=1,s=t[a]}return{c:r.subarray(0,i),n:e}},wt=function(t,e){for(var r=0,i=0;i>8,t[s+2]=255^t[s],t[s+3]=255^t[s+1];for(var n=0;n4&&!A[Z[I-1]];--I);var O,N,R,L,M=l+5<<3,P=wt(s,ht)+wt(n,ut)+o,x=wt(s,d)+wt(n,m)+o+14+3*I+wt(k,A)+2*k[16]+3*k[17]+7*k[18];if(c>=0&&M<=P&&M<=x)return bt(e,h,t.subarray(c,c+l));if(gt(e,h,1+(x15&&(gt(e,h,$[T]>>5&127),h+=$[T]>>12)}}}else O=dt,N=ht,R=pt,L=ut;for(T=0;T255){Et(e,h,O[(H=V>>18&31)+257]),h+=N[H+257],H>7&&(gt(e,h,V>>23&31),h+=Q[H]);var q=31&V;Et(e,h,R[q]),h+=L[q],q>3&&(Et(e,h,V>>5&8191),h+=J[q])}else Et(e,h,O[V]),h+=N[V]}return Et(e,h,O[256]),h+N[256]},Tt=new X([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),St=new Y(0),At=function(t,e,r,i,s,n){var o=n.z||t.length,a=new Y(i+o+5*(1+Math.ceil(o/7e3))+s),c=a.subarray(i,a.length-s),l=n.l,h=7&(n.r||0);if(e){h&&(c[0]=n.r>>3);for(var u=Tt[e-1],d=u>>13,p=8191&u,f=(1<7e3||A>24576)&&(L>423||!l)){h=kt(t,c,0,y,w,b,T,A,I,S-I,h),A=k=T=0,I=S;for(var M=0;M<286;++M)w[M]=0;for(M=0;M<30;++M)b[M]=0}var P=2,x=0,D=p,B=N-R&32767;if(L>2&&O==v(S-B))for(var U=Math.min(d,L)-1,$=Math.min(32767,S),H=Math.min(258,L);B<=$&&--D&&N!=R;){if(t[S+P]==t[S+P-B]){for(var V=0;VP){if(P=V,x=B,V>U)break;var q=Math.min(B,V-2),F=0;for(M=0;MF&&(F=j,R=G)}}}B+=(N=R)-(R=m[N])&32767}if(x){y[A++]=268435456|it[P]<<18|nt[x];var K=31&it[P],W=31&nt[x];T+=Q[K]+J[W],++w[257+K],++b[W],_=S+P,++k}else y[A++]=t[S],++w[t[S]]}}for(S=Math.max(S,_);S=o&&(c[h/8|0]=l,Z=o),h=bt(c,h+1,t.subarray(S,Z))}n.i=o}return mt(a,0,i+ft(h)+s)},_t=function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var r=e,i=9;--i;)r=(1&r&&-306674912)^r>>>1;t[e]=r}return t}(),It=function(){var t=-1;return{p:function(e){for(var r=t,i=0;i>>8;t=r},d:function(){return~t}}},Ot=function(t,e,r,i,s){if(!s&&(s={l:1},e.dictionary)){var n=e.dictionary.subarray(-32768),o=new Y(n.length+t.length);o.set(n),o.set(t,n.length),t=o,s.w=n.length}return At(t,null==e.level?6:e.level,null==e.mem?s.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):20:12+e.mem,r,i,s)},Nt=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},Rt=function(t,e){var r=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:9==e.level?2:0,t[9]=3,0!=e.mtime&&Nt(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),r){t[3]=8;for(var i=0;i<=r.length;++i)t[i+10]=r.charCodeAt(i)}},Lt=function(t){return 10+(t.filename?t.filename.length+1:0)};function Mt(t,e){e||(e={});var r=It(),i=t.length;r.p(t);var s=Ot(t,e,Lt(e),8),n=s.length;return Rt(s,e),Nt(s,n-8,r.d()),Nt(s,n-4,i),s}var Pt="undefined"!=typeof TextEncoder&&new TextEncoder,xt="undefined"!=typeof TextDecoder&&new TextDecoder;try{xt.decode(St,{stream:!0}),1}catch(t){}function Dt(t,e){if(e){for(var r=new Y(t.length),i=0;i>1)),o=0,a=function(t){n[o++]=t};for(i=0;in.length){var c=new Y(o+8+(s-i<<1));c.set(n),n=c}var l=t.charCodeAt(i);l<128||e?a(l):l<2048?(a(192|l>>6),a(128|63&l)):l>55295&&l<57344?(a(240|(l=65536+(1047552&l)|1023&t.charCodeAt(++i))>>18),a(128|l>>12&63),a(128|l>>6&63),a(128|63&l)):(a(224|l>>12),a(128|l>>6&63),a(128|63&l))}return mt(n,0,o)}"function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout&&setTimeout;const Bt=t=>{if("string"==typeof t)return Mt(Dt(t));if(!ArrayBuffer.isView(t))throw new Error("Data must be UInt* data type or string");return Mt(t)};function Ut(t,...e){const r=1===e.length&&e[0].includes(".")?e[0].split("."):e;let i=t;for(let t=0;t0&&([r]=e),r}function Vt(t,e){let r;if(r="function"==typeof e?t.findIndex(e):t.findIndex((t=>t===e)),r>=0){const e=t.splice(r,1);if(e&&e.length>0)return e[0]}}const qt=()=>{if(void 0===CE2.state._isFB){const t=CE2.n.userAgent;for(let e=0,r=["FBSN","FBAN","FBAV"];e-1){CE2.state._isFB=!0;break}}CE2.state._isFB||(CE2.state._isFB=!1)}return CE2.state._isFB},Ft=function(t,e){const r=t[e];return function(...e){try{return r.apply(t,e)}catch(t){CE2.debug(t)}}},Gt=function(t,e){const r=CE2.fp.scroll(e);return[t.clientX+r.left,t.clientY+r.top]},jt=function(t){const e="key_"+ +new Date;try{const r=t.contentWindow;r[e]="temp";const i="temp"===r[e];return i&&delete r[e],i}catch(t){return!1}},Kt=function(t){return"string"==typeof t.tagUrn&&t.tagUrn.indexOf("vml")>=0},Wt=function(t){let e;return e=CE2.ieVersion&&(CE2.ieVersion<9||CE2.ieQuirksMode)?{1:"l",2:"r",4:"m"}:{0:"l",1:"m",2:"r"},e[t.button]};var Yt=r(2886);class zt{constructor(t){CE2BH.defineProperty(this,"CHECKOUT_STARTED_KEY","ceeccs"),CE2BH.defineProperty(this,"eventTypes",{ADD_TO_CART:1,CHECKOUT_STARTED:2,CHECKOUT_COMPLETED:3}),this.tracker=t,this.tracker.addEventListener("mousedown",(t=>{"l"===Wt(t)&&this.onClick&&this.onClick(t)}))}static api(){return this.NAME.toLowerCase()}api(){return this.constructor.api()}setCheckoutStarted(){CE2.cookieStorage.set(this.CHECKOUT_STARTED_KEY,1)}getCheckoutStarted(){return"1"===CE2.cookieStorage.get(this.CHECKOUT_STARTED_KEY)}delCheckoutStarted(){CE2.cookieStorage.del(this.CHECKOUT_STARTED_KEY)}isCheckoutStarted(){return!this.getCheckoutStarted()&&this.CHECKOUT_STARTED_PATH_REGEXP&&this.CHECKOUT_STARTED_PATH_REGEXP.test(CE2.w.location.pathname)}isCheckoutCompleted(){return this.getCheckoutStarted()&&this.CHECKOUT_COMPLETED_PATH_REGEXP&&this.CHECKOUT_COMPLETED_PATH_REGEXP.test(CE2.w.location.pathname)}update(){this.isCheckoutStarted()&&this.startCheckout(),this.isCheckoutCompleted()&&this.checkoutCompleted()}startCheckout(){this.setCheckoutStarted(),this.sendCheckoutStartedEvent()}checkoutCompleted(t=[]){this.delCheckoutStarted(),this.sendCheckoutCompletedEvent(t)}sendCheckoutStartedEvent(){this.sendEvent([this.eventTypes.CHECKOUT_STARTED]),this.emitEvent("startCheckout")}sendCheckoutCompletedEvent(t=[]){this.sendEvent([this.eventTypes.CHECKOUT_COMPLETED,...t]);const[e,r,i]=t;this.tracker.session?.isFull()&&(r||0===r)&&CE2.setSessionWorth(r/1e4,i);let s={};(r||0===r)&&(s={value:r/1e4,currency:i}),this.emitEvent("checkoutCompleted",s)}addToCart(t){this.delCheckoutStarted(),this.sendEvent([this.eventTypes.ADD_TO_CART,...t]);const[e,r,i,s,n]=t;this.tracker.session?.isFull()&&(s||0===s)&&CE2.increaseSessionWorth(s/1e4,n);let o={};(s||0===s)&&(o={value:s/1e4,currency:n}),this.emitEvent("addToCart",o)}sendEvent(t=[]){if(!this.tracker.session?.isFull())return;t=[this.tracker.visitID,...t];const e=this.tracker.newEvent(CE2.eventTypes.ECOMMERCE,{attributes:t});this.tracker.send(e)}emitEvent(t,e={}){CE2.w.dispatchEvent(new CustomEvent(`crazyegg.${t}`,{detail:CE2BH.extends({type:t,api:this.constructor.api()},e)}))}amountInCents(t){return this.tracker.amountInCents(t)}}CE2BH.defineProperty(zt,"NAME","Base");class Xt extends zt{}CE2BH.defineProperty(Xt,"NAME","Generic");class Qt extends zt{constructor(...t){super(...t),CE2BH.defineProperty(this,"CHECKOUT_STARTED_PATH_REGEXP",/\/checkout(s)?\//i),CE2BH.defineProperty(this,"CHECKOUT_COMPLETED_PATH_REGEXP",/\/checkout(s)?\/.*thank(_|-)?you/i)}onClick(t){const{target:e}=t;if((0,Yt.B5)(e,'button[name="add"]')||/^\s*(add to (cart|bag|basket)|buy now)\s*$/i.test(e.innerText||e.value)){let t=[];if(CE2.w.ShopifyAnalytics?.meta?.currency&&CE2.w.ShopifyAnalytics?.meta?.product?.variants?.length&&CE2.w.ShopifyAnalytics?.meta?.selectedVariantId){const r=CE2.w.ShopifyAnalytics.meta.selectedVariantId,i=CE2.w.ShopifyAnalytics.meta.product.variants.find((t=>t.id==r)),s=e.closest("product-info");let n=1;if(s){const t=s.querySelector(".quantity__input");t&&(n=t.value||1)}t=[i.id,i.name,n,this.amountInCents(i.price/100)*n,CE2.w.ShopifyAnalytics.meta.currency]}this.addToCart(t)}}sendCheckoutCompletedEvent(){const t=CE2.w.Shopify&&CE2.w.Shopify.checkout||{},e=this.amountInCents(t.total_price&&t.total_price);super.sendCheckoutCompletedEvent([t.order_id,e,t.currency])}static match(){return CE2.w&&CE2.w.Shopify&&Ut(CE2.w,"ShopifyAnalytics.lib.integrations")}}CE2BH.defineProperty(Qt,"NAME","Shopify");class Jt extends zt{constructor(...t){super(...t),CE2BH.defineProperty(this,"CHECKOUT_STARTED_PATH_REGEXP",/\/checkout(s)?\//i),CE2BH.defineProperty(this,"CHECKOUT_COMPLETED_PATH_REGEXP",/\/checkout(s)?\/.*((thank(_|-)?you)|(order-received))/i)}onClick(t){const{target:e}=t;if((0,Yt.B5)(e,'.single_add_to_cart_button, [class*="add_to_cart"], [class*="add-to-cart"]')||/^\s*(add to (cart|bag|basket)|buy now)\s*$/i.test(e.innerText||e.value)){let t=[];const e=Jt.getProduct();if(e)try{const r=CE2.d.querySelector("input.qty"),i=e.offers&&(e.offers[0]||e.offers);this.currency=i&&i.priceCurrency,t=[e.sku||e["@id"],e.name,r&&r.value,this.amountInCents(i&&(i.price||i.lowPrice||i.hightPrice)),i&&i.priceCurrency]}catch(t){(0,G.Yz)("error extracting product data",t)}this.addToCart(t)}}static getProduct(){for(let t=0,e=CE2.d.querySelectorAll('script[type="application/ld+json"]');t"Product"===t["@type"]));if(e)return e}}}catch(t){(0,G.Yz)("error extracting product data",t)}}}sendCheckoutCompletedEvent(){const t=CE2.d.querySelector(".order"),e=CE2.d.querySelector(".total");super.sendCheckoutCompletedEvent([Jt.getValue(t&&t.innerText),this.amountInCents(Jt.getValue(e&&e.innerText)),this.currency])}static getValue(t){return t&&(t.indexOf(":")>-1?t.split(":")[1].trim():t)}static match(){return CE2.w&&Object.keys(CE2.w).find((t=>/^wc_.*_params$/.test(t)))}}CE2BH.defineProperty(Jt,"NAME","Woocommerce");class Zt extends zt{constructor(...t){super(...t),CE2BH.defineProperty(this,"CHECKOUT_STARTED_PATH_REGEXP",/\/checkout(s)?\//i),CE2BH.defineProperty(this,"CHECKOUT_COMPLETED_PATH_REGEXP",/\/checkout(s)?\/.*success/i)}onClick(t){const{target:e}=t;if((0,Yt.B5)(e,'#product-addtocart-button, [class*="add_to_cart"], [class*="add-to-cart"]')||/^\s*(add to (cart|bag|basket)|buy now)\s*$/i.test(e.innerText||e.value)){let t=[];const r=Zt.getProduct(e);this.currency=r.priceCurrency,r&&(t=[r.id,r.name,r.qty,this.amountInCents(r.price),r.priceCurrency]),this.addToCart(t)}}static getProduct(t){const e={};try{const r=t.closest(".product-info-main");e.name=CE2.d.querySelector(".page-title")&&CE2.d.querySelector(".page-title").innerText,e.qty=r.querySelector("input.qty")&&r.querySelector("input.qty").value,e.id=r.querySelector('input[name="product"]')&&r.querySelector('input[name="product"]').value,e.price=r.querySelector('[itemprop="price"]')&&(r.querySelector('[itemprop="price"]').getAttribute("content")||r.querySelector('[itemprop="price"]').innerText),e.priceCurrency=r.querySelector('[itemprop="priceCurrency"]')&&r.querySelector('[itemprop="priceCurrency"]').getAttribute("content")}catch(t){(0,G.Yz)("error extracting product data",t)}return e}sendCheckoutCompletedEvent(){const t=CE2.d.querySelector(".order-number"),e=CE2.d.querySelector(".grand_total .amount");super.sendCheckoutCompletedEvent([t&&t.innerText,e&&e.innerText&&this.amountInCents(e.innerText),this.currency])}static match(){return CE2.w&&CE2.w.checkout&&CE2.w.checkout.checkoutUrl&&CE2.w.checkout.websiteId||[...document.scripts].find((t=>t.src&&t.src.indexOf("Magento")>-1))||[...document.querySelectorAll("link")].find((t=>t.href&&t.href.indexOf("Magento")>-1))}}CE2BH.defineProperty(Zt,"NAME","Magento");class te extends zt{constructor(...t){super(...t);const e=CE2.w.location.host,r=this.onEvent.bind(this);CE2.w.CE2_WIX_API_TESTING?CE2.w.wixDevelopersAnalytics.register(e,r):CE2.w.addEventListener("wixDevelopersAnalyticsReady",(()=>{CE2.w.wixDevelopersAnalytics.register(e,r)}))}onEvent(t,e){if("AddToCart"===t){const t=[e.sku,e.name,e.quantity,this.amountInCents(e.price),e.currency];this.addToCart(t)}"InitiateCheckout"===t&&this.startCheckout(),"Purchase"===t&&this.checkoutCompleted([e.orderId,this.amountInCents(e.revenue),e.currency])}static match(){return CE2.w&&!!CE2.w.fedops}}CE2BH.defineProperty(te,"NAME","WixApi");class ee extends zt{constructor(...t){super(...t),CE2BH.defineProperty(this,"CHECKOUT_STARTED_PATH_REGEXP",/\/checkout\?cartToken/i),CE2BH.defineProperty(this,"CHECKOUT_COMPLETED_PATH_REGEXP",/\/website\/thank-you-page/i),CE2BH.defineProperty(this,"ADD_TO_CART_BUTTON_NAME_PATTERN",/add to (cart|bag|basket)/i),CE2BH.defineProperty(this,"CHECKOUT_BUTTON_NAME_PATTERN",/checkout/i),CE2BH.defineProperty(this,"getProductData",(()=>{const t=CE2.d.querySelectorAll('script[type="application/ld+json"]'),e=CE2.d.querySelector(".product-variants[data-selected-variant]");if(!e)return(0,G.Yz)("Variants not found"),null;const r=CE2.Native.JSON.parse(e.getAttribute("data-selected-variant"));if(r)for(let e=0;e(0,Yt.B5)(t,".sqs-add-to-cart-button-inner"))(e)&&(t=>this.ADD_TO_CART_BUTTON_NAME_PATTERN.test(t.innerText||t.value))(e))return this.processAddToCardAction();(t=>this.CHECKOUT_BUTTON_NAME_PATTERN.test(t.innerText||t.value))(e)&&!this.getCheckoutStarted()&&this.startCheckout()}processAddToCardAction(){try{const t=this.getProductData();t&&this.addToCart(t)}catch(t){(0,G.Yz)("error extracting product data",t)}}static match(){return CE2.w&&(CE2.w.SQUARESPACE_ROLLUPS||Object.keys(CE2.w).find((t=>t.includes("__INITIAL_SQUARESPACE"))))}}CE2BH.defineProperty(ee,"NAME","Squarespace");const re=[Qt,Jt,Zt,te,ee],ie=function(){for(let t=0;t|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,oe=/\((\S*)(?::(\d+))(?::(\d+))\)/;const ae=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;const ce=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,le=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;const he=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;const ue=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function de(t){return t.split("\n").reduce(((t,e)=>{const r=function(t){const e=ne.exec(t);if(!e)return null;const r=e[2]&&0===e[2].indexOf("native"),i=e[2]&&0===e[2].indexOf("eval"),s=oe.exec(e[2]);return i&&null!=s&&(e[2]=s[1],e[3]=s[2],e[4]=s[3]),{file:r?null:e[2],methodName:e[1]||se,arguments:r?[e[2]]:[],lineNumber:e[3]?+e[3]:null,column:e[4]?+e[4]:null}}(e)||function(t){const e=ae.exec(t);return e?{file:e[2],methodName:e[1]||se,arguments:[],lineNumber:+e[3],column:e[4]?+e[4]:null}:null}(e)||function(t){const e=ce.exec(t);if(!e)return null;const r=e[3]&&e[3].indexOf(" > eval")>-1,i=le.exec(e[3]);return r&&null!=i&&(e[3]=i[1],e[4]=i[2],e[5]=null),{file:e[3],methodName:e[1]||se,arguments:e[2]?e[2].split(","):[],lineNumber:e[4]?+e[4]:null,column:e[5]?+e[5]:null}}(e)||function(t){const e=ue.exec(t);return e?{file:e[2],methodName:e[1]||se,arguments:[],lineNumber:+e[3],column:e[4]?+e[4]:null}:null}(e)||function(t){const e=he.exec(t);return e?{file:e[3],methodName:e[1]||se,arguments:[],lineNumber:+e[4],column:e[5]?+e[5]:null}:null}(e);return r&&t.push(r),t}),[])}var pe=r(401);class fe{constructor(t=[]){this.cached_assets=new Set;for(let e=0;et.push(e))),t}}var me=r(4808);const ge=["Failed to execute 'importScripts' on 'WorkerGlobalScope'"];class Ee{constructor(t){this.tracker=t,this.setupCache(),this.setupQueue(),"undefined"!=typeof CE_ERROR_TRACKING_CONFIG&&CE_ERROR_TRACKING_CONFIG.app_version&&(this.appVersion=CE_ERROR_TRACKING_CONFIG.app_version),"undefined"!=typeof CE_ERROR_TRACKING_CONFIG&&CE_ERROR_TRACKING_CONFIG.delay_time?this.delayTime=CE_ERROR_TRACKING_CONFIG.delay_time:this.delayTime=1e4,"undefined"!=typeof CE_ERROR_TRACKING_CONFIG&&CE_ERROR_TRACKING_CONFIG.fingerprint?this.fingerprint=CE_ERROR_TRACKING_CONFIG.fingerprint:this.fingerprint=(t,e)=>{const r=[];return r.push(`${e.name}`),e.file&&r.push(`[${e.file}:${e.lineno}:${e.colno}]`),r.join(" ")},this.tracker.addEventListener("error",(0,Yt.oI)(this,"onError")),this.tracker.addEventListener("unhandledrejection",(0,Yt.oI)(this,"onError"))}static removeFingerprintFrom(t){if(!t)return t;if(t.replace(".js","").match(/^([0-9]+([\-|\.|\_])?)+$/))return t;return t.split(/([a-z0-9]+[\-|\.|\_]+)/i).filter((t=>{if(!t)return!1;const e=t.replace(/[^0-9]/g,"").length,r=t.replace(/[\.\-\_]/,"").length,i=e===r;return!!(i&&e<=3)||!(e/r>.15||i)})).join("").replace(/[\-\.\_]js$/,".js")}update(){this.setupQueue(),this.setupCache()}onError(t){try{let e;e="Script error."===t.message?this.buildBaseError(t,t.reason,null,"CrossOrigin Error"):t.error?this.buildBaseError(t,t.error):t.promise?this.buildBaseError(t,t.reason,"UnhandledPromise ->"):this.buildBaseError(t);for(let t=0;t0;){const{timestamp:t,errorAttributes:i}=this.bufferQueue[0];if(!e&&+new Date-t{e(t)}),this.delayTime)}}flush(t){this.processQueue(!1,!0,t)}assignAttribute(t="rageClicked"){this.bufferQueue.forEach((e=>{e.errorAttributes[t]=!0}))}buildBaseError(t,e,r,i=null){const s=CE2BH.extends({},this.parseErrorFileAttributes(t,e),this.parseErrorMessageAttributes(t,e,i));return s.uuid=(0,Yt.Jl)(),s.appVersion=this.appVersion,s.url=CE2.w.location.href,s.name=r?`${r} ${s.name}`:s.name,s.fingerprint=t.fingerprint||this.fingerprint(t,s),s.rageClicked=!1,s.bounced=!1,s}parseErrorFileAttributes(t,e){let r={};if(t.filename)r={filename:t.filename,lineno:t.lineno,colno:t.colno,stack:e&&e.stack&&e.stack.toString()};else if(e&&e.stack)try{const t=de(e.stack);t.length>=1&&(r={filename:t[0].file,lineno:t[0].lineNumber,colno:t[0].column,stack:e.stack.toString()})}catch(t){(0,me.A)(t)}if(r.filename&&0!==r.filename.indexOf("blob:"))if(this.isValidFileUrl(r.filename)){const t=new CE2.URL(r.filename),e=new CE2.URL(CE2.w.location.href);if(t.path!==e.path){let e=t.path;"/"!==t.path&&"/"===t.path[t.path.length-1]&&(e=t.path.slice(0,t.path.length-1)),r.file="/"!==e?e.split("/").pop():e}}else r.file="unknown";return r.file=Ee.removeFingerprintFrom(r.file),r}parseErrorMessageAttributes(t,e,r=null){const i={};if(e&&e.message){const t=e.message.replace(/^Uncaught /,"");i.message=e.name?`${e.name}: ${t}`:t}else if(e)i.message=e;else if(t.message)i.message=t.message.replace(/^Uncaught /,"");else if(t.target){const e=["Error on"];t.target.tagName&&e.push(t.target.tagName),t.target.src&&e.push(t.target.src!==CE2.w.location.href?t.target.src:"Empty src attribute"),i.message=e.join(" "),i.name="Unknown Resource Error"}return i.message||(i.message="Unknown Error"),r?i.name=r:i.name||(i.name=function(t){if(t.length<=50)return t.trim();const e=t.trim().split(" ");for(let t=1;t<=e.length;t++){const r=e.slice(0,t).join(" ");if(r.length<=50)continue;const i=t===e.length;return r.trim()+(i?"":" ...")}return t.trim()}(i.message)),i}isValidFileUrl(t){try{if(window.URL)return!!new window.URL(t)}catch(t){(0,me.A)(t)}}}const Ce=[[.4,.4],[.5,.4],[.5,.5],[.4,.5],[.3,.5],[.3,.4],[.3,.3],[.4,.3],[.5,.3],[.6,.3],[.6,.4],[.6,.5],[.6,.6],[.5,.6],[.4,.6],[.3,.6],[.2,.6],[.2,.5],[.2,.4],[.2,.3],[.2,.2],[.3,.2],[.4,.2],[.5,.2],[.6,.2],[.7,.2],[.7,.3],[.7,.4],[.7,.5],[.7,.6],[.7,.7],[.6,.7],[.5,.7],[.4,.7],[.3,.7],[.2,.7],[.1,.7],[.1,.6],[.1,.5],[.1,.4],[.1,.3],[.1,.2],[.1,.1],[.2,.1],[.3,.1],[.4,.1],[.5,.1],[.6,.1],[.7,.1],[.8,.1],[.8,.2],[.8,.3],[.8,.4],[.8,.5],[.8,.6],[.8,.7],[.8,.8],[.7,.8],[.6,.8],[.5,.8],[.4,.8],[.3,.8],[.2,.8],[.1,.8],[0,.8],[0,.7],[0,.6],[0,.5],[0,.4],[0,.3],[0,.2],[0,.1],[0,0],[.1,0],[.2,0],[.3,0],[.4,0],[.5,0],[.6,0],[.7,0],[.8,0],[.9,0],[.9,.1],[.9,.2],[.9,.3],[.9,.4],[.9,.5],[.9,.6],[.9,.7],[.9,.8],[.9,.9],[.8,.9],[.7,.9],[.6,.9],[.5,.9],[.4,.9],[.3,.9],[.2,.9],[.1,.9],[0,.9]],ve=`cedk${Math.random().toString().replace(/\D/g,"")}`;function ye(t,e,r){if(!t||!t.nodeName)return!1;if(t==CE2.d||t==CE2.d.documentElement||t==CE2.d.body)return!1;if(Kt(t))return!1;if(r){if(!function(t){let e;if(t[ve])return!1;for(;t&&t!=CE2.d&&t!=CE2.d.documentElement&&t!=CE2.d.body;t=t.parentNode)if(e=CE2.w.getComputedStyle(t),e&&("absolute"==e.position||"fixed"==e.position))return!(t[ve]=!0);return!0}(t))return!1;if(CE2.fp.getBox(t).height>2*e.height)return!1}return!0}function we(t,e,r){const i=CE2.d.elementFromPoint(t+r.left,e+r.top);return i.nodeType===i.TEXT_NODE?i.parentNode:i}function be(t,e){return CE2.d.elementFromPoint(t,e)}let ke=function(...t){if(CE2.d.elementFromPoint)return ke=CE2.webkit&&CE2.webkitVersion<533||CE2.opera&&CE2.operaVersion<10?we:be,ke(...t)};class Te{constructor(){this.strictAnchorSearch=!0,this.lastRecordedScroll=null,this.lastRecordedTime=0,this.lastRecordedY=0,this.idleAt=null,this.idleSince=(new Date).getTime()}shouldRecordScroll(t){const e=t.top,r=t.height,i=`${e}:${r}`,s=(new Date).getTime();if(i==this.lastRecordedScroll)return!1;if(i==this.idleAt){if(s-this.idleSince>=800)return this.lastRecordedScroll=i,this.lastRecordedTime=s,this.lastRecordedY=e,!0}else this.idleAt=i,this.idleSince=s;return null==this.lastRecordedScroll||Math.abs(e-this.lastRecordedY)>r/2&&s-this.lastRecordedTime>=1600?(this.lastRecordedScroll=i,this.lastRecordedTime=s,this.lastRecordedY=e,!0):void 0}findAnchor(t,e){if(!CE2.d.elementFromPoint)return e(t);const r=this;let i=0,s=this.strictAnchorSearch;const{width:n}=t,{height:o}=t;let a,c,l,h;const u=function(){if(a=Ce[i++]){if(l=(a[0]+.1*Math.random())*n,h=(a[1]+.1*Math.random())*o,c=ke(l,h,t),ye(c,t,s))return e(t,c);setTimeout(u,0)}else i=0,r.strictAnchorSearch=s=!1,setTimeout(u,0)};setTimeout(u,0)}}CE2.EXCESSIVE_SCROLL_TIMEOUT=3e3;var Se=r(715);const Ae="ce_submit_forms";function _e(t,e){const r=t[e];return"string"==typeof r?r:t.getAttribute(e)}class Ie{static formAttributes(t){return[_e(t,"id"),_e(t,"name"),new CE2.Native.URL(_e(t,"action"),CE2.w.location.href).toString()]}static validateEmail(t){const e=document.createElement("input");return e.type="email",e.required=!0,e.value=t,"function"==typeof e.checkValidity?e.checkValidity():/\S+@\S+\.\S+/.test(t)}constructor(t){CE2BH.defineProperty(this,"EMAIL_ATTRIBUTE_REGEX",/e([-_])?mail/i),CE2BH.defineProperty(this,"FORM_REGEX",/sign([-_\s])?up|checkout|log([-_\s])?in|sign([-_\s])?in/i),CE2BH.defineProperty(this,"eventTypes",{SUBMIT:1,RESUBMIT:2,ABANDON:3,SIGNUP:4,LOGIN:5,EMAIL:6,SEARCH:7}),this.tracker=t,this.tracker.addEventListener("mousedown",(t=>{"l"===Wt(t)&&this.onClick(t)})),CE2.data.auto_identity&&!CE2.IDENTIFIER&&(CE2.w.ShopifyAnalytics&&Ut(CE2.w,"ShopifyAnalytics.meta.page.customerId")&&(0,Se.ls)(CE2.w.ShopifyAnalytics.meta.page.customerId),this.tracker.addEventListener("blur",(0,Yt.oI)(this,"onBlur")),this.tracker.addEventListener("submit",(0,Yt.oI)(this,"onBlur"))),this.tracker.addEventListener("submit",(0,Yt.oI)(this,"onSubmit")),this.tracker.addEventListener("input",(0,Yt.oI)(this,"onInput")),this.tracker.addEventListener("beforeunload",(0,Yt.oI)(this,"beforeUnload")),this.editedForms=[],this.submittedForms=CE2.Native.JSON.parse(CE2.Native.sessionStorageWrapper.read(Ae)||"[]")}onClick(t){const{target:e}=t;if(!e)return;const r=e.closest("form"),i="INPUT"===e.tagName&&("button"===e.type||"submit"===e.type);if(r&&i||"BUTTON"===e.tagName){const t="INPUT"===e.tagName?e.value:e.innerText;(/(log\s*in)|(sign\s*in)/i.test(t)||r&&/(log[\-_]in)|(sign[\-_]in)/i.test(r.action))&&this.sendEvent([this.eventTypes.LOGIN]),(/(sign\s*up)|register/i.test(t)||r&&/(sign[\-_\s]up)|register/i.test(r.action))&&this.sendEvent([this.eventTypes.SIGNUP])}"INPUT"!==e.tagName&&"BUTTON"!==e.tagName||"submit"===e.type&&r&&this.submit(r,e)}onSubmit(t){const e=t.target;e&&(e.ce_submit&&+new Date-e.ce_submit<100||this.submit(e))}onBlur(t){try{const{target:e}=t;if(!e||"function"!=typeof e.closest)return;const r=e.closest("form"),i="INPUT"===e.tagName&&e.value&&Ie.validateEmail(e.value);r&&this.isAuthForm(r)&&i&&!CE2.IDENTIFIER&&(0,Se.ls)(e.value)}catch(t){(0,G.Yz)("form blur trigger failed",t)}}onInput(t){const{target:e}=t;if(!e)return;const r=e.closest("form");r&&!this.editedForms.includes(r)&&this.editedForms.push(r),r&&!r.ce_time_start&&(r.ce_time_start=+new Date),"INPUT"===e.tagName&&("search"===e.type||e.placeholder&&/search/i.test(e.placeholder))&&(!e.ce_search||+new Date-e.ce_search>3e4)&&(e.ce_search=+new Date,this.sendEvent([this.eventTypes.SEARCH])),"INPUT"===e.tagName&&e.value&&Ie.validateEmail(e.value)&&(!e.ce_email_sent||+new Date-e.ce_email_sent>6e4)&&(e.ce_email_sent=+new Date,this.sendEvent([this.eventTypes.EMAIL]))}beforeUnload(){this.editedForms.forEach((t=>{this.sendEvent([this.eventTypes.ABANDON,...Ie.formAttributes(t)])})),this.editedForms=[],CE2.Native.sessionStorageWrapper.write(Ae,CE2.Native.JSON.stringify(this.submittedForms))}submit(t){try{const e=this.editedForms.indexOf(t);-1!==e&&this.editedForms.splice(e,1),t.ce_submit=+new Date;const r=Ie.formAttributes(t);let i;-1!==this.submittedForms.indexOf(CE2.Native.JSON.stringify(r))?i=this.eventTypes.RESUBMIT:(this.submittedForms.push(CE2.Native.JSON.stringify(r)),i=this.eventTypes.SUBMIT);const s=[i,...r];t.ce_time_start&&(s.push(+new Date-t.ce_time_start),delete t.ce_time_start),this.sendEvent(s)}catch(t){(0,G.Yz)("form submit event failed",t)}}sendEvent(t=[]){t=[this.tracker.visitID,...t];const e=this.tracker.newEvent(CE2.eventTypes.FORM,{attributes:t});this.tracker.send(e)}isAuthForm(t){const e=_e(t,"action"),r=_e(t,"class"),i=_e(t,"id"),s=_e(t,"name");return this.isMatch(e)||this.isMatch(r)||this.isMatch(i)||this.isMatch(s)}isMatch(t,e=this.FORM_REGEX){return t&&t.match(e)}}class Oe{constructor(){this.events=[],this.api=this.apiName(),this.find(),this.listeners=new Set}destroy(){throw new Error(`${this.constructor.name}.destroy() not implemented`)}find(){throw new Error(`${this.constructor.name}.find() not implemented`)}apiName(){throw new Error(`${this.constructor.name}.apiName() not implemented`)}urlMatches(){throw new Error(`${this.constructor.name}.urlMatches(url) not implemented`)}getId(){throw new Error(`${this.constructor.name}.getId() not implemented`)}getEventType(){throw new Error(`${this.constructor.name}.getEventType() not implemented`)}recordEvent(t){const e={api:this.api,properties:t},r=this.getId(t);null!=r&&(e.id=r);const i=this.getEventType(t);"string"==typeof i&&i.trim().length>0&&(e.type=i),this.events.push(e),this.listeners.forEach((t=>{t(e)}))}addListener(t){this.listeners.add(t)}removeListener(t){this.listeners.delete(t)}}class Ne{constructor(){this.listeners=new Set,this.bufferedEvents=[]}trigger(...t){0===this.listeners.size?this.bufferedEvents.push(t):this.listeners.forEach((e=>{e(...t)}))}destroy(){throw new Error(`${this.constructor.name}.destroy() not implemented`)}triggerBuffered(){if(this.bufferedEvents.length>0){for(let t=0,e=this.bufferedEvents;t{this.trigger(t.getAttribute("src"))})),this.observer.observe(document.documentElement,{subtree:!0,childList:!0})}onMutation(t){for(let e=0;e{e[r]=t})),e}class Me extends Oe{constructor(){super(),this.$onScript=this.onScript.bind(this),Re.addListener(this.$onScript)}destroy(){Re.removeListener(this.$onScript)}apiName(){return"google"}urlMatches(t){if(!t||"string"!=typeof t)return;return["googleadservices.com/pagead/conversion/","googleads.g.doubleclick.net/pagead/viewthroughconversion/"].some((e=>t.toLowerCase().includes(e.toLowerCase())))}find(){const t=new Set;for(let e=0,r=document.querySelectorAll('script[src*="/gtag/"]');e0&&(this.ids=Array.from(t))}getId(t){if(t.source_url){const e=/\/pagead\/(viewthrough)?conversion\/([^/?#]+)/.exec(t.source_url);if(e&&e[2])return e[2]}}getEventType(t){if(t.gclid&&(t.medium||t.utm_medium))return"ad_click";const{data:e}=t;if(e){const t=/event=([^;]+)/.exec(e);if(t&&t[1])return t[1]}}onScript(t){if(!this.urlMatches(t))return;const e=Le(t);e.source_url=t,this.getEventType(e)&&this.recordEvent(e)}detectAdWordsConversion(t){const e=Le(t||window.location.href);e.gclid&&("cpc"===e.medium&&e.gad_source||"paid_search"===e.utm_medium&&e.utm_source)&&this.recordEvent(e)}}const Pe=window.Image;function xe(...t){const e=new Pe(...t);return Object.defineProperty(e,"src",{set(t){setTimeout((()=>{De.trigger(t)}),0),e.setAttribute("src",t)},get:()=>e.getAttribute("src")}),e}class De extends Ne{constructor(){super(),window.Image=xe,window.Image.toString=()=>Pe.toString()}destroy(){window.Image=Pe}}class Be extends Oe{constructor(){super(),this.$onImage=this.onImage.bind(this),De.addListener(this.$onImage)}destroy(){De.removeListener(this.$onImage)}apiName(){return"meta"}urlMatches(t){return t.startsWith("https://www.facebook.com/tr/")}find(){if(window.fbq&&window.fbq.instance&&window.fbq.instance.pixelsByID){const t=Object.keys(window.fbq.instance.pixelsByID);t.length>0&&(this.ids=t)}}getId(t){return t.id}getEventType(t){return t.ev}onImage(t){if(!this.urlMatches(t))return;const e=Le(t);this.getEventType(e)&&this.recordEvent(e)}}const Ue=navigator.sendBeacon;function $e(t,e){return setTimeout((()=>{try{He.trigger(t,e)}catch(t){console.error("sendBeacon error: ",t.stack)}}),0),Ue.call(navigator,t,e)}class He extends Ne{constructor(){super(),navigator.sendBeacon=$e,navigator.sendBeacon.toString=()=>Ue.toString()}destroy(){navigator.sendBeacon=Ue}}class Ve extends Oe{constructor(){super(),this.$onSendBeacon=this.onSendBeacon.bind(this),He.addListener(this.$onSendBeacon)}destroy(){He.removeListener(this.$onSendBeacon)}apiName(){return"tiktok"}urlMatches(t){return t.startsWith("https://analytics.tiktok.com/")}find(){const t=document.querySelectorAll('script[src*="analytics.tiktok.com"][data-id]'),e=new Set(Array.from(t).map((t=>t.dataset.id)));e.size>0&&(this.ids=Array.from(e))}getId(t){return t?.context?.pixel?.code}getEventType(t){return t.event}onSendBeacon(t,e){if(!this.urlMatches(t))return;const r=JSON.parse(e);this.getEventType(r)&&this.recordEvent(r)}}const qe={google:Me,meta:Be,tiktok:Ve};class Fe{constructor(t="all"){if("all"===t)this.pixels={google:new Me,meta:new Be,tiktok:new Ve};else{this.pixels={};for(let e=0;e{this.findPixels(),this.initMutationObserver()},document.addEventListener("DOMContentLoaded",this.$onDomReady),this.findPixels(),this.initMutationObserver()}destroy(){document.removeEventListener("DOMContentLoaded",this.$onDomReady),window.removeEventListener("load",this.$onLoad);for(let t=0,e=Object.values(this.pixels);t{for(let e=0;e{if(!r||r.type!==e)return!1;if(!t.on_any_page&&!(0,Ke.V4)(t.on_page,CE2.w.location.href))return!1;let s=t[`selector_for_${{1:"desktop",2:"phone",3:"tablet"}[CE2.clock.getDeviceType()]}`];return!!s&&("function"==typeof CE2.fixTriggerSelector&&(s=CE2.fixTriggerSelector(i,s)),!(!s||!(0,Yt.B5)(r.target,s,!0)))};Ke.DM.url_visit=Ke.DM.visited_page,Ke.DM.click=(t,{operand:e}={})=>{const{event:r,goalId:i}=e;return We(t,"mousedown",r,i)},Ke.DM.form_submission=(t,{operand:e}={})=>{const{event:r,goalId:i}=e;return We(t,"submit",r,i)},Ke.DM.pixel_event=(t,{operand:e}={})=>((t,e)=>{if(!t.on_any_page&&!(0,Ke.V4)(t.on_page,CE2.w.location.href))return!1;if(t.api!==e.api)return!1;const r="string"==typeof t.event&&t.event.toLowerCase();return!(r&&r!==e.type.toLowerCase()||"ad_click"!==r&&"string"==typeof t.id&&t.id.replace(/^(G|AW)-/,"")!==e.id)})(t,e.event),Ke.DM.ecommerce_event=(t,{operand:e}={})=>((t,e)=>{if(!t.on_any_page&&!(0,Ke.V4)(t.on_page,CE2.w.location.href))return!1;if(t.api!==e.detail?.api)return!1;const r="string"==typeof t.event&&t.event.toLowerCase();return!r||r===e.detail?.type?.toLowerCase()})(t,e.event);class Ye{constructor(t){this.tracker=t,this.goals=this.tracker.goals;const e=(0,Yt.oI)(this,"onClickOrSubmit");this.tracker.addEventListener("mousedown",e),this.tracker.addEventListener("submit",e);const{onActivity:r}=Ye;this.tracker.addEventListener("mousemove",r),this.tracker.addEventListener("scroll",r),this.tracker.addEventListener("keydown",r),this.tracker.addEventListener("pagehide",r);const i=(0,Yt.oI)(this,"onEcommerceEvent");this.tracker.addEventListener("crazyegg.addToCart",i),this.tracker.addEventListener("crazyegg.startCheckout",i),this.tracker.addEventListener("crazyegg.checkoutCompleted",i),this.pixelObserver=new Fe(Ye.pixelApisFromGoals(this.goals)),this.pixelObserver.addEventListener(this.onPixelEvent.bind(this)),this.pixelObserver.pixels?.google?.detectAdWordsConversion(),this.goalValuesObserver=new je.O(this.goals,[this.onGoalValueEvent.bind(this)])}cleanup(){this.pixelObserver.destroy(),delete this.pixelObserver}onClickOrSubmit(t){Ge.r.alive(),this.goals.forEach((e=>{e.triggers.forEach((r=>{const i=r.filter.conditions.filter((t=>"click"===t.criteria||"form_submission"===t.criteria));0!==i.length&&this.matchGoal(e,r,i,"click",t)}))}))}onUrlVisit(){this.goals.forEach((t=>{t.triggers.forEach((e=>{const r=e.filter.conditions.filter((t=>"url_visit"===t.criteria));0!==r.length&&this.matchGoal(t,e,r)}))}))}onPixelEvent(t){this.goals.forEach((e=>{e.triggers.forEach((r=>{const i=r.filter.conditions.filter((t=>"pixel_event"===t.criteria));0!==i.length&&this.matchGoal(e,r,i,"pixel_event",t)}))}))}onEcommerceEvent(t){this.goals.forEach((e=>{e.triggers.forEach((r=>{const i=r.filter.conditions.filter((t=>"ecommerce_event"===t.criteria));0!==i.length&&this.matchGoal(e,r,i,"ecommerce_event",t)}))}))}onGoalValueEvent(t){CE2.nextGoalConversionValue(t.goal.id,t.value,t.trigger.id)}matchGoal(t,e,r,i,s){if((0,Ke._9)(r,{operand:{event:s,goalId:t.id}})){let r;s?.detail?.value&&(r={worth:s.detail?.value,currency:s.detail?.currency||Ge.r.getCurrency()}),this.tracker.goalConversion({goalId:t.id,value:r,triggerId:e.id,skipSessionWorth:"ecommerce_event"===i})}}static onActivity(){const t=+new Date;Ye.lastActive&&t-Ye.lastActive<=1e4||(Ye.lastActive=t,Ge.r.alive())}static pixelApisFromGoals(t){if(!CE2.Native.Array.isArray(t))return[];const e=new Set;return t.forEach((t=>{t.triggers.forEach((t=>{t.filter.conditions.forEach((t=>{"pixel_event"===t.criteria&&t.values.forEach((t=>{t.api&&e.add(t.api)}))}))}))})),CE2.Native.Array.from(e)}}const ze=/[:@;%~='"\|\*\/\\\.\[\]\{\}\(\)]/g,Xe=/^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/;function Qe(t){if(t instanceof DocumentFragment)return":scope";let e=[];const{id:r}=t;if(e.push(t.nodeName.toLowerCase()),r&&"string"==typeof r&&!/^\d/.test(r))e.push(`#${s=r,s.replace(ze,"\\$&").replace(/^\s+|\s+$/g,"")}`);else{const r=(i=t,[].slice.call(i.classList).filter((t=>t.match(Xe))).map((t=>`.${t}`)).join(""));r&&e.push(r)}var i,s;if(e=e.join(""),1===t.parentNode.querySelectorAll(e).length)return e;const n=function(t){const{children:e}=t.parentNode;let r=0;for(let i=0;i ")),1!==s.length);t=t.parentNode);return t._ce_selector=e.join(" > ")}function tr(t){try{!t||t.isCensored||CE2.d.hidden||(t.ce||(t.ce={}),t.ce.imgScheduled||(t.ce.imgScheduled=!0,setTimeout((()=>{try{t.ce.imgScheduled=!1,t.toBlob((e=>{const r=new CE2.Native.URL(`/canvas-urls/${t.width}x${t.height}/${e.size}/${e.type&&e.type.replace("/",".")}`,CE2.d.baseURI).toString();t.ce.imgUrl=r,t.ce.blob=e,r!==t.getAttribute("ce-img-taken")&&t.setAttribute("ce-img-taken",r)}),"image/webp")}catch(t){(0,G.Yz)("error saving the canvas image",t)}}),1e3)))}catch(t){(0,G.Yz)("error saving the canvas image",t)}}function er(t){tr(t.canvas)}const rr=[{type:CE2.w.CanvasRenderingContext2D,methods:["stroke","fillText","strokeText","fillRect","drawImage","clearRect","translate","transform","fill","clear","rect","strokeRect","putImageData"]}],ir={track(){this.overridden||(rr.forEach((t=>{t.type&&t.methods&&t.methods.forEach((e=>{!function(t,e,r){const i=t.prototype[e];t.prototype[e]=function(...t){i.call(this,...t),r(this,e,...t)}}(t.type,e,er)}))})),CE2.d.querySelectorAll("canvas").forEach((t=>{tr(t)})),this.overridden=!0)}};const sr="ce_visit_timings";class nr{constructor(t){t===document?this.doc=t:(this.doc=t.shadowRoot,this.container=t),this.attachShadowListeners=[],this.patchAttachShadow(),this.onMutation=this._onMutation.bind(this),this.mutationObserver=new MutationObserver(this.onMutation),this.mutationObserver.observe(this.doc,{subtree:!0,childList:!0}),this.listeners=[],this.subMonitors=[],this.timeoutId=null,this.setupSubMonitors()}setupSubMonitors(){clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>{this.subMonitors.filter((t=>!this.doc.contains(t.container))).forEach((t=>this.removeSubMonitor(t.container))),this.findAllContainers().map((t=>this.addSubMonitor(t)))}))}destroy(){clearTimeout(this.timeoutId),this.mutationObserver&&this.mutationObserver.disconnect(),this.mutationObserver=null;for(let t=0,e=this.listeners;tt.shadowRoot))}findMonitor(t){if(this.doc===t||this.doc.contains(t))return this;for(let e=0,r=this.subMonitors;e{e(t)}))}onAttachShadow(t){this.attachShadowListeners.push(t)}_onMutation(){this.setupSubMonitors()}patchAttachShadow(){if(nr.patchedAttachShadow)return;const t=Element.prototype.attachShadow,e=this;Element.prototype.attachShadow=function(r){const i=t.call(this,r);return r&&"open"===r.mode&&e.attachShadow(this),i},nr.patchedAttachShadow=!0}addSubMonitor(t){if(!this.findSubMonitor(t)){const e=new nr(t);this.subMonitors.push(e);for(let t=0,r=this.listeners;te.container===t))}removeSubMonitor(t){const e=Vt(this.subMonitors,(e=>e.container===t));e&&e.destroy()}addEventListener(t,e,r){this.listeners.push({event:t,callback:e,opt:r}),this.doc.addEventListener(t,e,r);for(let i=0,s=this.subMonitors;ii.event===t&&i.callback===e&&i.opt===r)),this.doc.removeEventListener(t,e,r);for(let i=0,s=this.subMonitors;it.url===i.url));if(s>=0)this.queue[s]=i;else{e.findIndex((t=>t.url===i.url))<0&&e.push(i)}}e.length&&(this.queue=this.queue.concat(e)),this.updateStorage()}fetch(t){const e=this.queue.splice(0,t);return this.updateStorage(),e}include(t){return this.queue.findIndex((e=>e.url===t))>-1}length(){return this.queue.length}updateStorage(){this.storageKey&&CE2.Native.sessionStorageWrapper.write(this.storageKey,CE2.Native.JSON.stringify(this.queue))}}class lr{constructor(t){this.tracker=t,this.OBSERVER_CACHE_KEY="ce_asset",this.LOCAL_CACHE_ASSET_MAX_SIZE=5e3,this.LOCAL_ASSET_OBSERVER_CACHE_KEY="ce_local_asset_cache",this.WAITING_QUEUE_KEY="ce_asset_waiting",this.SAMPLE_INTERVAL="undefined"==typeof CE_ASSET_COLLECTOR_INTERVAL?1e4:CE_ASSET_COLLECTOR_INTERVAL,this.URL_REGEX=/url\(["'](.+?)["']\)/,this.BATCH_SIZE=20;const e=new Set;for(let t=0,r=CE2.ASSET_COLLECTOR_IGNORE_DOMAINS;t{this.IGNORE_DOMAINS.push(t)}))}setup(){this.uri=new CE2.URL(CE2.w.location.toString()),this.setupObserverCache(),this.setupWorker(),this.schedulePerformanceObserver(),this.scheduleDataAndBlobCollection(1e3),this.collectCanvasImages()}cleanup(){this.performanceObserver&&(this.performanceObserver.disconnect(),delete this.performanceObserver),this.collectAssetsTimeout&&clearTimeout(this.collectAssetsTimeout),this.collectCanvasImagesTimeout&&clearTimeout(this.collectCanvasImagesTimeout),this.worker&&this.worker.terminate()}setupObserverCache(){const t=CE2.Native.sessionStorageWrapper.read(this.LOCAL_ASSET_OBSERVER_CACHE_KEY);this.observerCache=t?new fe(CE2.Native.JSON.parse(t)):new fe}addObserverCache(t){if(t&&t.length){for(let e=0;e{this.handlePerformanceEntries(t.getEntries())})),this.performanceObserver.observe({entryTypes:["resource"]})))}scheduleDataAndBlobCollection(t){this.collectAssetsTimeout=setTimeout((0,Yt.oI)(this,"collectDataAndBlobAssets"),t)}handlePerformanceEntries(t){const e=[];let r;const i=[];let s=!1;for(let n=0;nt.forEach((t=>i.push(t.href))))),s=!0),i.includes(o.name)&&(a=!0)),a&&(r=this.prepareAsset(o.name,{source:"network"}),r&&e.push(r))}this.queueForWorker(e)}setupWorker(){if(!this.worker){if(this.workerQueue=new cr,this.workerWaitingQueue=new cr(this.WAITING_QUEUE_KEY),this.worker=(0,Yt.UO)("crazyegg-assets",(t=>{if("undefined"==typeof CE2libs)return void CE2.debug("[Tracker] CE2libs not available");const{assets:e,session:r,uid:i,origin:s,trackURL:n,trackingKey:o,userAgent:a}=t.data,c={session:r,uid:i,origin:s,assets:[],userAgent:a};for(let t=0;t-1?i.digest=CE2libs.md5(r.data):i.digest=CE2libs.md5((new FileReaderSync).readAsText(r.data.slice(0,8e3)))),c.assets.push(i)}CE2.http.send(`${n}/assets?tk=${o}`,JSON.stringify(c),{contentType:"application/json",retry:5,callback:t=>{let r;if(200===t.status)r=JSON.parse(t.responseText);else{if(204!==t.status)return void postMessage({status:t.status,assets:e});r=[]}for(let t=0;ti.url===t.url));s?(i.status=s.status,i.s3=s.s3):(i.status=2,i.timestampEnd=+new Date,i.collector="s")}CE2.promisePool(e,2,(t=>new Promise((e=>{if(t.s3){const r=new CE2.FormData;for(let e=0,i=Object.keys(t.s3.fields);e{t.status=2,t.timestampEnd=+new Date,t.collector="c",e(t)}})}else e(t)})))).then((()=>{postMessage({status:"ok",assets:e})})).catch((t=>{CE2.debugError(t)}))}})}),!0),!this.worker)return;this.worker.onmessage=t=>{const e=[],r=[],i=[];"ok"!==t.data.status&&CE2.debug("[Tracker] Assets api unavailable",t.data.status);for(let s=0,n=t.data.assets;s0?this.runWorker():setTimeout((0,Yt.oI)(this,"runWorker"),this.SAMPLE_INTERVAL)},this.runWorker()}}queueForWorker(t){t.length&&this.workerQueue.push(t)}runWorker(t){let e=t;e&&e.length||(e=this.workerQueue.fetch(this.BATCH_SIZE),e.length||(e=this.workerWaitingQueue.fetch(this.BATCH_SIZE))),e.length?this.fetchAssetsData(e).then((t=>{this.worker.postMessage({assets:t,session:this.tracker.session.id,uid:CE2.data.uid,origin:`${CE2.w.location.protocol}//${CE2.w.location.host}`,trackURL:this.tracker.trackURL,trackingKey:CE2.data.tracking_key,userAgent:CE2.data.explicit_agent&&ar[CE2.clock.getDeviceType()]||""})})).catch((t=>{CE2.debugError(t)})):setTimeout((0,Yt.oI)(this,"runWorker"),this.SAMPLE_INTERVAL)}isBlobUrl(t){return 0===t.indexOf("blob:")}fetchAssetsData(t){return new Promise((e=>{CE2.promisePool(t,2,(t=>new Promise((e=>{if(!t.data&&t.corsSafe){let r=t.originalUrl;if(!t.local){const t=new CE2.URL(r);t.query=t.query&&t.query.length?`${t.query}&`:"",t.query+="ce=true",r=t.getFullUrl()}try{CE2.http.get(r,(r=>{200===r.status&&r.response?(t.data=r.response,t.contentType=r.getResponseHeader("Content-Type"),t.contentLength=r.response.size?r.response.size:parseInt(r.getResponseHeader("Content-Length"),10)):t.failed=!0,e(t)}),"blob")}catch(r){t.failed=!0,e(t)}}else e(t)})))).then((t=>{const r=[],i=[];for(let e=0;e=0)return}let s=t;this.isBlobUrl(t)&&(s=t.replace("blob:","")),0===t.indexOf("data:")&&(s=`${CE2.w.location.protocol}//${CE2.w.location.host}/data-urls/${t.length}`),0===s.indexOf("//")&&(s=`${i.protocol}:${s}`);let n=new CE2.URL(s);n.host||(n=i.join(n)),n.normalize();const o=n.getFullUrl();return"http"!==n.protocol&&"https"!==n.protocol||this.checkObserverCache(o)||this.workerWaitingQueue.include(o)?void 0:(r.url=n.getFullUrl(),r.cacheKey=o,this.localUrl(r.url)&&(r.local=!0,r.corsSafe=!0),r)}isBlobOrDataUrl(t){return t&&(t.indexOf("blob:")>=0||t.indexOf("data:")>=0)}sendEvent(t){const e=[];for(let r=0;r0)continue;const s=[i.url,i.status,i.timestamp];i.timestampEnd&&(s.push(i.timestampEnd),s.push(i.collector)),e.push(s)}if(!e.length)return;const r=[this.tracker.visitID,e],i=this.tracker.newEvent(CE2.eventTypes.ASSETS,{attributes:r});this.tracker.send(i)}}const hr={Click:class{constructor(t){this.tracker=t,this.opaqueElement=null,this.lastClicked=null,this.ignoredElements=CE2.state.ignoredElements.concat([...CE2.d.body.getElementsByClassName("-ce-ignore")]),this.resetLimitCount(),this.tracker.addEventListener("mousedown",Ft(this,"onClick")),this.tracker.addEventListener("change",Ft(this,"onChange"));for(let t=0,e=CE2.d.querySelectorAll("OBJECT, EMBED");t1&&i.height>1&&(this.tracker.addEventListener("mouseover",Ft(this,"onOver"),r),this.tracker.addEventListener("mouseout",Ft(this,"onOut"),r))}for(let t=0,e=CE2.d.querySelectorAll("FRAME, IFRAME");t1&&t.height>1&&(this.tracker.addEventListener("mouseover",Ft(this,"onOver"),r),this.tracker.addEventListener("mouseout",Ft(this,"onOut"),r))}}this.tracker.addEventListener("blur",Ft(this,"onBlur")),this.tracker.addEventListener(CE2.opera?"unload":"beforeunload",Ft(this,"onUnload"))}update(){this.resetLimitCount()}cleanup(){delete this.lastClicked,delete this.lastClickedTime,delete this.ignoredElements,this.resetLimitCount()}resetLimitCount(){this.clickTotal=0}overLimit(){return!!(0,Yt.jI)("per-visit-event-limit")&&this.clickTotal>100}onChange(t){if(t.target&&"SELECT"===t.target.tagName){this.tracker.onActivity();for(let e=0,r=t.target.querySelectorAll("option");e=13?Ht(t):t.srcElement||t.target;if("OPTION"===e.tagName&&e.parentElement&&"SELECT"===e.parentElement.tagName)return;this.click(e,null,null,r,t)}}onBlur(){const t=this.opaqueElement;t&&t!==this.lastClicked&&(this.click(t),this.opaqueElement=null)}onUnload(){const t=this.opaqueElement;t&&this.isIgnored(t)&&(this.click(t),this.opaqueElement=null)}onClickFrame(t){this.onClick(t,!0)}onOver(t){const e=t.srcElement||t.target;this.isIgnored(e)||(this.opaqueElement=e)}onOut(t){this.isIgnored(t.srcElement||t.target)||(this.opaqueElement=null)}click(t,e,r,i,s){if(this.isTopLevelElement(t)||this.isIgnored(t))return;if(t=this.tracker.getElementToRecord(t),Kt(t))return;const n=this.tracker.getFingerprint(t),o=this.getClickPosition(e,r,n,s);o.button=i,"l"===i&&(o.clickType=this.getClickType(s)),this.lastClicked=t;const a=[this.tracker.visitID,...this.tracker.getFingerprintAttributes(n),o.x,o.y,o.button,o.pageX,o.pageY,o.clickType],c=this.tracker.newEvent(CE2.eventTypes.CLICK,{attributes:a});this.tracker.send(c)}getClickPosition(t,e,r,i){let s;const n={x:t||0,y:e||0,pageX:0,pageY:0};return i&&(i.srcElement||i.target)?(t||(s=Gt(i),n.x=s[0]-r.pageX,n.y=s[1]-r.pageY),n.pageX=i.pageX,n.pageY=i.pageY):t&&e?(n.x=t,n.y=e):i||(n.x=n.pageX=r.width/2,n.y=n.pageY=r.height/2),n}getClickType(t){if(!t)return"";const e=Ht(t),r=this.isClickableElement(e);let i="";return r||(i+=CE2.clickTypes.NOT_CLICKABLE),this.rageClick(t,e,r)&&(i+=CE2.clickTypes.RAGE,this.tracker.rageClick()),r&&this.authenticationButton(e)&&(i+=CE2.clickTypes.AUTH_BUTTON),i||void 0}rageClick(t,e,r){if(!t)return!1;if(t.timeStamp===this.lastEventTimeStamp)return this.lastRageValue;let i=!1;if(t.detail>2)i=!0;else if(this.lastClickedTime){const s=+new Date-this.lastClickedTime;(r&&this.lastClickedElement===e&&2!==t.detail||!r)&&s<3e3&&(i=!0)}return this.lastClickedTime=+new Date,this.lastEventTimeStamp=t.timeStamp,this.lastRageValue=i,this.lastClickedElement=e,i}authenticationButton(t){if(t.innerText){const e=t.innerText.trim().toLowerCase(),r=["sign in with","register with","authorize","join with"].some((t=>new RegExp(`^${t}`).test(e)));return!!r||["sign in","signin","signup","sign up","register","login","create account","register account","join","join us"].some((e=>e===t.innerText.trim().toLowerCase()))}}isClickableElement(t){const e=["a","a *","button","button *","input","option","select"].join(",");if((0,Yt.B5)(t,e))return!0;const r=getComputedStyle(t);return"pointer"===r.cursor||"text"===r.cursor||"underline"===r.textDecoration}isTopLevelElement(t){return t===document||t===document.body||t===document.documentElement}isIgnored(t){return(0,Yt.DQ)(this.ignoredElements,t)}},PageState:class{constructor(t){this.tracker=t,this.pageStateCapturing=!1}update(t){if(this.prevState=null,t&&this.pageStateCapturing&&(CE2.pageState.stopCapture(),this.pageStateCapturing=!1),!this.pageStateCapturing){(0,Yt.jI)("v11_canvas_tracking")&&ir.track();try{CE2.pageState.startCapture(this.captureOptions()),this.pageStateCapturing=!0}catch(t){this.tracker.pageStateError(t)}}}cleanup(){this.pageStateCapturing&&CE2.pageState.stopCapture()}trigger(t,e,r,i,s,n){if(!this.prevState||this.prevState.pageUrl!==t||this.prevState.md5!==r){const o=[s||this.tracker.visitID,t,r,e,n],a=this.tracker.newEvent(CE2.eventTypes.PAGE_STATE,{timestamp:i,attributes:o});this.tracker.send(a,{timestamp:i}),this.prevState={pageUrl:t,md5:r}}}captureOptions(){const{tracker:t}=this;return{uid:CE2.data.uid,trackURL:t.trackURL,getVisitId:()=>t.visitID,getUrl:()=>t.url,onPageState:(...e)=>t.pageState(...e),onPageStateError:(...e)=>t.pageStateError(...e),censoredElements:t.censoredElements,hideIframes:t.hideIframes,disableMasking:!!CE2.data.disable_recordings_masking,disableEmailMasking:!!CE2.data.disable_recordings_email_masking,stylesheetPerformance:(0,Yt.jI)("v11_page_state_performance")}}},Error:Ee,Scroll:class{constructor(t){this.tracker=t,this.scrollTracker=new Te,this.trackScrollInterval=setInterval((0,Yt.oI)(this,"trackScroll"),100),this.foundAnchorBind=(0,Yt.oI)(this,"foundAnchor"),this.resetLimitCount()}update(){this.resetLimitCount()}cleanup(){clearInterval(this.trackScrollInterval),delete this.scrollTracker,delete this.foundAnchorBind,this.resetLimitCount()}trackScroll(){if(this.overLimit())return;const t=CE2.fp.scroll();this.scrollTracker.shouldRecordScroll(t)&&this.scrollTracker.findAnchor(t,this.foundAnchorBind)}foundAnchor(t,e){const r=t.top,i=t.height;let s,n,o;this.scrollTotal+=1,e&&(e=this.tracker.getElementToRecord(e),s=this.tracker.getFingerprint(e),n=t.top-s.pageY,o=t.top+t.height-s.pageY);const a=[this.tracker.visitID,...this.tracker.getFingerprintAttributes(s,{blank:["name"]}),r,i,n,o],c=this.tracker.newEvent(CE2.eventTypes.SCROLL,{attributes:a});this.tracker.send(c)}resetLimitCount(){this.scrollTotal=0}overLimit(){return!!(0,Yt.jI)("per-visit-event-limit")&&this.scrollTotal>=1e3}},Ecommerce:ie,GoalConversion:Ye,ExcessiveScroll:class{constructor(t){this.tracker=t,this.timeout=CE2.EXCESSIVE_SCROLL_TIMEOUT,this.isTriggered=!1,this.isScrolledDown=!1,this.scrollTracker=new Te,this.viewport=null,setTimeout((0,Yt.oI)(this,"cleanup"),this.timeout),this.trackScrollInterval=setInterval((0,Yt.oI)(this,"trackScroll"),500),this.foundAnchorBind=(0,Yt.oI)(this,"foundAnchor")}cleanup(){clearInterval(this.trackScrollInterval),this.isTriggered=!1,this.isScrolledDown=!1,this.viewport=null,delete this.scrollTracker,delete this.foundAnchorBind}trackScroll(){const t=CE2.fp.scroll();this.scrollTracker.findAnchor(t,this.foundAnchorBind)}foundAnchor(t,e){if(this.isTriggered)return;const r=this.anchorViewport(t,e),i=r.viewportTop/r.viewportHeight*100;this.isScrolledDown?i<=80&&(this.sendEvent(this.viewport),this.isTriggered=!0):i>90&&(this.viewport=r,this.isScrolledDown=!0)}anchorViewport(t,e){const r=t.top,i=t.height;let s,n,o;return e&&(e=this.tracker.getElementToRecord(e),s=this.tracker.getFingerprint(e),n=t.top-s.pageY,o=t.top+t.height-s.pageY),{viewportTop:r,viewportHeight:i,viewportTopDistance:n,viewportBottomDistance:o}}sendEvent({viewportTop:t,viewportHeight:e,viewportTopDistance:r,viewportBottomDistance:i}){const s=[this.tracker.visitID,t,e,r,i],n=this.tracker.newEvent(CE2.eventTypes.EXCESSIVE_SCROLL,{attributes:s});this.tracker.send(n),this.tracker.addTag("excessive scroll")}},MouseMovement:class{constructor(t){CE2BH.defineProperty(this,"mouseEventTypes",{movement:"m",mouseup:"u",mousedown:"d"}),this.tracker=t,this.mousePos=null,this.mousePositions=[],this.tracker.addEventListener("mousemove",(0,Yt.oI)(this,"mousemove")),this.tracker.addEventListener("mouseup",(0,Yt.oI)(this,"mouseup")),this.tracker.addEventListener("mousedown",(0,Yt.oI)(this,"mousedown")),this.tracker.addSampleCallback((0,Yt.oI)(this,"sample")),this.tracker.addDiffCallback((0,Yt.oI)(this,"diff"))}overLimit(){const t=this.tracker?.eventHandlers?.click;return t?.overLimit()}cleanup(){}mousedown(t){if(!t)return;this.tracker.onActivity();const e=this.buildMouseEvent(t,this.mouseEventTypes.mousedown);e&&(this.mousePos=e,this.sample())}mouseup(t){if(!t)return;this.tracker.onActivity();const e=this.buildMouseEvent(t,this.mouseEventTypes.mouseup);e&&(this.mousePos=e,this.sample())}mousemove(t){if(!t)return;this.tracker.onActivity();const e=this.buildMouseEvent(t,this.mouseEventTypes.movement);e&&(this.mousePos=e)}sample(){try{const{mousePos:t}=this;if(t){const e=this.mousePositions[this.mousePositions.length-1];if(e&&((t,e)=>{const r=Object.getOwnPropertyNames(t),i=Object.getOwnPropertyNames(e);if(r.length!=i.length)return!1;for(let i=0;i0){const t=[];for(let e=0,r=this.mousePositions;et===e.type&&e.type.toLowerCase())))&&(this.lastTypedElement!==e||this.lastTypedTime-r>this.LIMIT_BETWEEN_TYPE_EVENTS)){const t=(0,Yt.B5)(e,"form *"),i=[this.tracker.visitID,t],s=this.tracker.newEvent(CE2.eventTypes.TYPING,{attributes:i});this.tracker.send(s),t&&(this.formEntry=r)}this.lastTypedElement=e,this.lastTypedTime=e}},SessionScroll:class{constructor(t){this.tracker=t,this.scrolls=[],this.calculateInitialScrolls(),this.tracker.addEventListener("scroll",(0,Yt.oI)(this,"onScroll"),or),this.tracker.addDiffCallback((0,Yt.oI)(this,"diff"))}onScroll(t){if(this.tracker.onActivity(),this.overLimit())return;let e=t.target;e===CE2.d&&(e=CE2.d.scrollingElement);const r=t.composed&&t.composedPath();this.bufferScrollFor(e,r)}bufferScrollFor(t,e=null){const r=function(t,e=null){if(!e)return[Ze(t)];const r=[[]];for(let t=0;tZe(t[0])))}(t,e||or.getComposedPath(t)),i=this.scrollKey(r),s=this.scrolls.find((t=>this.scrollKey(t[0])===i)),n=Date.now(),o=this.recordScrollOfElement(t);if(s){const e=s[1],r=e[e.length-1];n-r[2]>this.tracker.SAMPLE_INTERVAL?e.push(o):(r[0]=t.scrollTop,r[1]=t.scrollLeft)}else this.scrolls.push([r,[o]])}recordScrollOfElement(t){return[t.scrollTop,t.scrollLeft,+new Date]}diff(){try{if(this.scrolls.length>0){const t=[this.tracker.visitID,this.scrolls],e=this.tracker.newEvent(CE2.eventTypes.SESSION_SCROLL,{attributes:t});this.tracker.send(e),this.scrolls=[]}}catch(t){(0,me.A)(t)}}scrollKey(t){return t.join("→")}calculateInitialScrolls(){const t=CE2.d.querySelectorAll("html, body, body *");for(let e=0;et.type)).includes("reload")}update(t,e){if(this.isReloadedVisit)return;const{pathname:r}=CE2.w.location;if(!this.visitPath||e){this.visitPath=r,this.currentVisit=this.getVisitTiming(r)||{};const t=+new Date;if(this.currentVisit&&this.currentVisit.endTime&&this.currentVisit.endTime-t<2e4){const t=[this.tracker.visitID],e=this.tracker.newEvent(CE2.eventTypes.QUICKBACK,{attributes:t});this.tracker.send(e)}this.isReloadedVisit=!1}}unload(){return this.currentVisit&&(this.currentVisit.endTime=+new Date,this.putVisitTiming(this.visitPath,this.currentVisit)),!1}putVisitTiming(t,e){const r=this.getVisitsTimings();r[t]=e,CE2.Native.sessionStorageWrapper.write(sr,CE2.Native.JSON.stringify(r))}getVisitTiming(t){return this.getVisitsTimings()[t]}getVisitsTimings(){return CE2.Native.JSON.parse(CE2.Native.sessionStorageWrapper.read(sr)||"{}")}},Resize:class{constructor(t){this.tracker=t,this.browserSizes=[],this.tracker.addSampleCallback((0,Yt.oI)(this,"sample")),this.tracker.addDiffCallback((0,Yt.oI)(this,"diff"))}sample(){try{const t=CE2.w,e=t.innerWidth||t.screen.availWidth,r=t.innerHeight||t.screen.availHeight,{lastBrowserSize:i}=this;if(i&&i[0]===e&&i[1]===r)return;if(qt&&i&&i[0]===e&&i[1]!==r)return;this.lastBrowserSize=[e,r,+new Date],this.browserSizes.push(this.lastBrowserSize)}catch(t){(0,me.A)(t)}}diff(){try{if(this.browserSizes.length>0){const t=[this.tracker.visitID,this.browserSizes],e=this.tracker.newEvent(CE2.eventTypes.RESIZE,{attributes:t});this.tracker.send(e),this.browserSizes=[]}}catch(t){(0,me.A)(t)}}},Activity:class{constructor(t){CE2BH.defineProperty(this,"ACTIVITY_WINDOW",1e4),CE2BH.defineProperty(this,"INACTIVE_TIME_LIMIT",9e4),this.tracker=t,this.trigger()}update(){this.trigger()}trigger(){const t=+new Date;if(this.lastActive){const e=t-this.lastActive;if(e>this.INACTIVE_TIME_LIMIT){const t=[this.tracker.visitID,e],r=this.tracker.newEvent(CE2.eventTypes.INACTIVE,{attributes:t});this.tracker.send(r,{timestamp:this.lastActive})}}const e=this.lastActive&&t-this.lastActive;e&&e<=this.ACTIVITY_WINDOW||(this.lastActive=t,this.tracker.session&&this.tracker.session.alive())}},Visibility:class{constructor(t){this.tracker=t,this.tracker.addEventListener("visibilitychange",(0,Yt.oI)(this,"onVisibilitychange"))}onVisibilitychange(){if(this.tracker.pageUnloading)return;const t=!document.hidden;if(this.tracker.isDocumentHiddenOnce||(this.tracker.isDocumentHiddenOnce=document.hidden),this.pageVisibility!==t){this.pageVisibility=t;const e=[this.tracker.visitID,t],r=this.tracker.newEvent(CE2.eventTypes.PAGE_VISIBILITY,{attributes:e});this.tracker.send(r),this.tracker.processBuffer({sendBeacon:!0})}}},Metric:class{constructor(t){this.tracker=t,this.tracker.addEventListener(CE2.opera?"unload":"beforeunload",(0,Yt.oI)(this,"onUnload"))}trigger(t,e){if(t.length>100)throw new Error("Key is too long (max 100)");if((e=Number(e,10))&&Number.isNaN(Number(e)))throw new Error("Value is NaN");const r=[this.tracker.visitID,t,e||""],i=this.tracker.newEvent(CE2.eventTypes.CUSTOM_PERFORMANCE,{attributes:r});this.tracker.send(i)}onUnload(){if(Object.keys(W.metrics).length)for(let t=0,e=Object.keys(W.metrics);t{t.O(0,[76],(()=>{return e=5096,t(t.s=e);var e}));var e=t.O(),r=CE2="undefined"==typeof CE2?{}:CE2;for(var i in e)r[i]=e[i];e.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})}]);